package com.glut.campusrepair.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

/**
 * 用户实体类
 */
@Data
@TableName("user")
public class User {
    @TableId
    private Long id;


    @NotBlank(message = "Username cannot be blank.")
    private String username;
    @NotBlank(message = "Password cannot be blank.")
    private String password;
    @Email(message = "Invalid email format.")
    private String email;
    @Pattern(regexp = "^\\d{11}$", message = "Phone number must be 11 digits.")
    private String phone;

}
